package com.gm.wholesale.module.print.api;

import android.util.ArrayMap;

import com.gm.commonlib.base.baseBean.BasePageData;
import com.gm.commonlib.base.baseBean.BaseResp;
import com.gm.commonlib.base.baseBean.DataResp;
import com.gm.wholesale.module.print.bean.PrintParmter;
import com.gm.wholesale.module.print.bean.PrintTemplateBean;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;

public interface IPrintApi {
    @GET("pda/api/v1/printing/template")
    Observable<BasePageData<PrintTemplateBean>> getPrintTemplate(@QueryMap ArrayMap<String,Object> data);


   @POST("/pda/api/v1/printing/template/{id}/enabled")
   Observable<BaseResp> setTemplate(@Path("id") long id,@QueryMap ArrayMap<String,Object> data);

   //打印订单
   @POST("pda/api/v1/printing/order/print")
   Observable<BasePageData<String>> print(@Body PrintParmter printParmter);

    //打印小票
    @POST("pda/api/v1/printing/lite/print")
    Observable<BasePageData<String>> printReceipt(@Body PrintParmter printParmter);


   //获取启用的 模板
   @GET("pda/api/v1/printing/template/enable")
   Observable<DataResp<PrintTemplateBean>> getTemplateEnable(@QueryMap ArrayMap<String,Object> data);
}
